package flyweighgt_pattern.ex2;

/**
 * @author 申书航
 * @version 1.0
 */
public class HolyWaterPotion implements Potion {

    @Override
    public void drink(Alchemist alchemist) {
        alchemist.setAttack(alchemist.getAttack() + 100);
        System.out.println("神圣药水，攻击力提升100");
        System.out.println(alchemist.getName() + System.identityHashCode(this));
    }

    @Override
    public void sell(int price) {
        System.out.println("神圣药水，价格：" + price);
    }
}
